package com.ruoyi.web.controller.api;

import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.system.domain.GwPlatformRights;
import com.ruoyi.system.domain.GwPlatformServiceOrder;
import com.ruoyi.system.service.IGwPlatformRightsService;
import com.ruoyi.system.service.IGwPlatformServiceOrderService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

/**
 * @ProjectName: back
 * @Package: com.ruoyi.web.controller.api
 * @ClassName: EnterpriseApiController
 * @Author: haiyue
 * @Description:
 * @Date: 2025/5/14 上午 10:19:12
 * @Version: 1.0
 */
@Api(description = "企业信息管理--小程序使用")
@RestController
@RequestMapping("/api/enterprise")
public class EnterpriseApiController {

    @Autowired
    private IGwPlatformRightsService platformRightsService;
    @Autowired
    private IGwPlatformServiceOrderService platformServiceOrderService;
    /**
     * 查询平台权益列表
     */
    @ApiOperation("权益套餐")
    @GetMapping("/platformRightsList")
    public AjaxResult platformRightsList(GwPlatformRights gwPlatformRights)
    {
        List<GwPlatformRights> list = platformRightsService.selectGwPlatformRightsList(gwPlatformRights);
        return AjaxResult.success(list);
    }

    /**
     * 查询平台服务订单列表
     */
    @ApiOperation("查询平台服务订单列表")
    @GetMapping("/platformServiceList")
    public AjaxResult list(GwPlatformServiceOrder gwPlatformServiceOrder)
    {
        List<GwPlatformServiceOrder> list = platformServiceOrderService.selectGwPlatformServiceOrderList(gwPlatformServiceOrder);
        return AjaxResult.success(list);
    }
}
